{extend name="admin@public/index"}
{block name="head"}

    <title>{:config('app_name')}</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script src="__ADMIN__/js/jquery-3.3.1.min.js"></script>
    <script src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script src="__ADMIN__/js/xadmin.js"></script>
{/block}

{block name="topbar"}
<div class="container">
    <div class="logo"><a href="{:url('admin/index/index')}">LiteAdmin v1.0</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>
    <!--<ul class="layui-nav left fast-add" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">+新增</a>
            <dl class="layui-nav-child"> &lt;!&ndash; 二级菜单 &ndash;&gt;
                <dd><a onclick="x_admin_show('资讯','http://www.baidu.com')"><i class="iconfont">&#xe6a2;</i>资讯</a></dd>
                <dd><a onclick="x_admin_show('图片','http://www.baidu.com')"><i class="iconfont">&#xe6a8;</i>图片</a></dd>
                <dd><a onclick="x_admin_show('用户','http://www.baidu.com')"><i class="iconfont">&#xe6b8;</i>用户</a></dd>
            </dl>
        </li>
    </ul>-->
    <ul class="layui-nav right" lay-filter="">
        {empty name="Think.session.admin"}
        <li class="layui-nav-item">
            <a href="{:url('admin/login/login')}">登陆</a>
        </li>
        {else/}
        <li class="layui-nav-item">
            <a href="javascript:;">{$Think.session.admin.name}</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a onclick="x_admin_show('个人信息','{:url("admin/index/edit")}?id={$Think.session.admin.id}')">个人信息</a></dd>
                <dd><a onclick="x_admin_show('更改密码','{:url("admin/index/password")}?id={$Think.session.admin.id}')">更改密码</a></dd>
                <dd><a href="{:url('admin/login/logout')}">退出</a></dd>
            </dl>
        </li>
        {/empty}
        <li class="layui-nav-item to-index"><a href="{:url('index/index/index')}" target="_blank">前台首页</a></li>
    </ul>
</div>
{/block}

{block name="menu"}
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            {volist name="menus" id="one"}
            <li>
                <a href="javascript:;" _href="{$one.url}">
                    <cite>{$one.title}</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                {notempty name="one.child"}
                {volist name="one.child"  id="two"}
                <ul class="sub-menu">
                    <li>
                        <a href="javascript:;"  _href="{$two.url}">
                            <cite>{$two.title}</cite>
                            <i class="iconfont nav_right">&#xe697;</i>
                        </a>
                        {notempty name="two.child"}
                        {volist name="two.child"  id="three"}
                        <ul class="sub-menu">
                            <li>
                                <a href="javascript:;" _href="{$three.url}">
                                    <cite>{$three.title}</cite>
                                </a>
                            </li>
                        </ul>
                        {/volist}
                        {/notempty}
                    </li>
                </ul>
                {/volist}
                {/notempty}
            </li>
            {/volist}
        </ul>
    </div>
</div>
{/block}

